package com.example.backblog.dto.blog;

import com.example.backblog.entity.blog.Blog;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

/**
 * A DTO for the {@link Blog} entity
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BlogDto implements Serializable {
    private Long id;
    private String title;
    private String content;
    private Long views;
    private Long likes;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date date;
    private Long categoryId;
    private String picture;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
    private Set<Long> tags;

}